-
Notifications
You must be signed in to change notification settings - Fork 197
Adds batch processing support #590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Hey @mhenrixon, thanks for this! I haven't looked at it yet, but there's a previous PR for batch support: #142 and a discussion there. It's work in progress as well, but maybe the discussion there is relevant for this, too. |
This builds on some work that I did for Sidekiq actually. I had to put a database in front of sidekiq to make it work like I wanted and to ensure that no duplicates are processed while some stuff needs to happen at the end.
Hey @rosa, so I had a look at the other PR! Admittedly, I am biased, but I feel that my suggestion is more in line with the code I already saw in solid_queue. I don't care either way as long as the functionality ends up in a release in the not so distant future, though. Would @jpcamara be open to share notes and get the feature across the finish line? I am more than happy to support you in finishing up the work in your branch. |
@mhenrixon would be good to change the API to support batch enqueue using a block also so that:
Which would support a use case we have where we have an Job enqueue using a block is possible in #142 |
I'll continue the work this weekend. Has been super busy developing a Hotwire native app at work. Thanks for letting me know about this. |
I have some free time this coming week to put together some notes and figure out next steps. I think neither of our PRs fully matches the solid queue model - the solid queue model has core tables and then execution models. Both of our PRs kind of dump everything into one hot path table. Maybe that's ok, I'm not sure yet. I want to re-evaluate my approach and line it up better with the overall architecture of SQ. I'd be happy to try to work together on this |
Gonna dig into this PR as well and your approach, I've only reviewed it a bit so far |
Let me know if you want to team up on this. It is a much-needed feature. |
This builds on some work that I did for Sidekiq.
I had to put a database in front of Sidekiq to make it work as I wanted and to ensure that no duplicates are processed, while some tasks need to occur at the end.
There are several factors to consider, including the tracking of pending jobs. This might be better as a simple query, depending on how fast the jobs are processed; it could cause side effects with concurrent increments.
This is intended to initiate a discussion. There are other ways of handling this, but none that I like. This is the only approach that I can think of that doesn't have too many negatives.
The only negative is the database changes.